/*
 *  Copyright (C), 2015-2024
 *  FileName: app_life_cycle_notification
 *  Author: Tonight丶相拥
 *  Date: 5/17/24
 *  Description: 
 **/
part of 'flutter_tool.dart';

mixin AppLifeCycleStateChange {
  void onAppLifeCycleStateChange(CustomAppLifeCycleState param);
}

mixin CustomAppLifeCycleTool implements AppLifeCycleStateChange {
  void addObserve() {
    InstanceInitialize._eventBus?.addListener(_onAppLifeCycleStateChange,
        name: _KeyboardObserveTool.keyboardChangeKey);
  }

  void removeObserve() {
    InstanceInitialize._eventBus?.removeListener(_onAppLifeCycleStateChange,
        name: _KeyboardObserveTool.keyboardChangeKey);
  }

  void _onAppLifeCycleStateChange(dynamic param)
    => onAppLifeCycleStateChange(param);
}